import { EnemyManage } from '../Base/EnemyManage'
import Singleton from '../Base/Singleton'
import { BurstManage } from '../Burst/BurstManage'
import { DoorManage } from '../Door/DoorManage'
import { ITile } from '../Levels'
import { PlayerManage } from '../Player/PlayerManage'
import { TileManage } from '../Scripts/Tile/TileManage'
import { SpikesManage } from '../Spikes/SpikesManage'

export default class DataManage extends Singleton {
  mapInfo: Array<Array<ITile>>
  tileInfo: Array<Array<TileManage>>
  mapRowCount: number = 0
  mapColCount: number = 0
  levelIndex: number = 1
  player: PlayerManage
  door: DoorManage
  enemies: EnemyManage[] = []
  bursts: BurstManage[] = []
  spikes: SpikesManage[] = []

  static get Instance() {
    return super.GetInstance<DataManage>()
  }

  reset() {
    this.mapInfo = []
    this.tileInfo = []
    this.player = null
    this.door = null
    this.enemies = []
    this.bursts = []
    this.spikes = []
    this.mapRowCount = 0
    this.mapColCount = 0
  }
}
